public class Solution2169 {
    public int countOperations(int num1, int num2) {
        int count=0;
        while (num1!=0 && num2!=0){
            if (num1<num2){
                int t=num1;
                num1=num2;
                num2=t;
            }
            count+=num1/num2;
            num1%=num2;
        }
        return count;
    }

    public static void main(String[] args) {
        System.out.println(new Solution2169().countOperations(2,3));
    }
}
